load [ device ] [ 0 | 1 ]
eject [ device ] [ 0 | 1 ]
unload [ device ] [ 0 | 1 ]
Eject or unload allows removable SCSI-devices (such as CD-ROM's) to be ejected under software control.
Load allows SCSI-devices that support automatic medium loading (like the Toshiba(TM) XM3601 CD-ROM) to be loaded under software control.
If no device is specified, the default ( /dev/sgc ) is used.
If called as load it tries to load the specified SCSI-device. No action is taken, if the device is already loaded.
If called as unload or eject it tries to eject the specified device. This should fail if the medium is mounted (see BUGS later in this manpage). Nothing happens if the medium is already ejected. Don't use this command on normal harddisks, as strange things may happen. If the motor of a harddisk stops, try a load - this should start your HD again.
The SCSI generic device files are mapped following this scheme: First the devices of the first SCSI controller in order of their ID.
Example: Three devices are attached to a controller. At ID 0 is an internal harddisk. At ID 2 we have a removeable disk (eighter a SyQuest or a ZIP-drive) and at ID 5 a CD-ROM drive. Assuming that all devices are powered at boot time, we got this mapping: Harddisk (ID 0) is assigned to /dev/sga. The removeable disk (ID 2) is assigned to /dev/sgb and the CD-ROM is assigned to /dev/sgc.
If these devices are missing on your system then you should do a 'cd /dev' and a 'MAKEDEV sg' to create the nessesary files.
/dev/sga
- First LUN of first ID at first Controller.
/dev/sgb
- Next LUN if available or first LUN of next ID if available
or first LUN of first ID of next Controller if available.
/dev/sgc
- ...
:
You probably shouldn't be able to eject a mounted medium, but some kernel drivers might allow it. With a CD-ROM this should not be harmfull because a CD is a read-only device. But with removeable harddisks such as SyQuest(tm) or Iomega(tm) ZIP-drive it can corrupt your filesystem (on the medium). To prevent this, make sure to unmount the according drives and to ensure to use the right SCSI generic device.
Check first if the device is a removeable medium.
Use an Environment variable as an alternative methode to specify a
different device.
/dev/sg[a-f] - Generic SCSI device files.
mount(2), umount(2), mount(8), umount(8)